package com.briup.cms.dao;

import com.briup.cms.bean.Notes;
import org.apache.ibatis.annotations.*;


import java.util.List;

public interface NotesMapper {
    @Results({
            @Result(column = "user_id",property = "userId")
    }
    )
    @Select("select * from notes")
    List<Notes> selectAll();

      @Insert("insert into notes value(null,#{title},#{content},#{type},#{status},#{userId})")
      void insert(Notes notes);
      @Update("update notes set title=#{title},content=#{content},type=#{type},status=#{status},user_id=#{userId} where id=#{id}")
      void update(Notes notes);
      @Delete("delete from notes where id=#{id}")
      void deleteById(long id);
}
